package com.cykj.admin.controller;

import com.cykj.admin.annotation.MyLog;
import com.cykj.admin.service.ICompanyCheckService;
import com.cykj.admin.vo.CompanyCheckVO;
import com.cykj.admin.vo.CompanyVO;
import com.cykj.common.dto.ResponseDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @BelongsProject: smart_recruit_backend
 * @BelongsPackage: com.cykj.admin.controller
 * @Author: 小小卢
 * @CreateTime: 2025-08-16 13:45
 * @Description: TODO
 * @Version: 1.0
 */
@Tag(name = "CompanyCheckController",description = "平台端公司资质审核的接口")
@RestController
@RequestMapping("company")
public class CompanyCheckController {
    @Autowired
    private ICompanyCheckService companyCheckService;

    /**
    * @Description: 查询全部公司审核信息
    * @Param: []
    * @return: com.cykj.common.dto.ResponseDTO
    */
    @Operation(summary = "平台端查询全部企业审核信息接口")
    @GetMapping("getCheckCompany")
    public ResponseDTO selectCheckCompany(CompanyCheckVO companyCheckVO){
        return companyCheckService.selectCheckCompany(companyCheckVO);
    }

    /**
     * @Description: 审核公司资质
     * @Param: []
     * @return: com.cykj.common.dto.ResponseDTO
     */
    @MyLog("审核企业资质")
    @Operation(summary = "平台端进行企业资质审核接口")
    @PutMapping("checkCompany")
    public ResponseDTO checkCompany(@RequestBody CompanyVO companyVO){
        return companyCheckService.checkCompany(companyVO);
    }

    /**
     * @Description: 上传营业执照并识别存储
     * @Param: [file]
     * @return: com.cykj.common.dto.ResponseDTO
     */
//    @Operation(summary = "上传营业执照接口")
//    @PostMapping(value = "/uploadLicense", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
//    public ResponseDTO uploadLicense(@RequestParam("file") MultipartFile file) {
//        return companyCheckService.processBusinessLicense(file);
//    }
}